package com.weibo.view.composite;

import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.ScrolledComposite;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.TabFolder;
import org.eclipse.swt.widgets.TabItem;

import swing2swt.layout.BorderLayout;

public class IndexComposite extends BaseComposite{

	public IndexComposite(Composite parent, int style) {
		super(parent, style);
	}

	@Override
	public void paint() {
		TabFolder tabFolder = new TabFolder(this, SWT.NONE);
		tabFolder.setLayoutData(BorderLayout.CENTER);
		
		TabItem tab_all = new TabItem(tabFolder, SWT.NONE);
		tab_all.setText("全部"); 
		ScrolledComposite scrolledComposite = new ScrolledComposite(tabFolder, SWT.H_SCROLL | SWT.V_SCROLL ); 
		Composite tab_all_control = new Composite(scrolledComposite, SWT.NONE);
		tab_all_control.setLayout(new FillLayout(SWT.V_SCROLL));
		WeiboComposite btnNewButton_2 = new WeiboComposite(tab_all_control, SWT.NONE);
		WeiboComposite btnNewButton_1 = new WeiboComposite(tab_all_control, SWT.NONE);
		WeiboComposite btnNewButton_3 = new WeiboComposite(tab_all_control, SWT.NONE);
		WeiboComposite btnNewButton_4 = new WeiboComposite(tab_all_control, SWT.NONE);
		WeiboComposite btnNewButton_5 = new WeiboComposite(tab_all_control, SWT.NONE);
		scrolledComposite.setContent(tab_all_control);
		scrolledComposite.setExpandHorizontal( true );  
		scrolledComposite.setExpandVertical( true );  
		scrolledComposite.setMinWidth(100);  
		scrolledComposite.setMinHeight(100);
		tab_all.setControl(scrolledComposite);
		
		TabItem tab_payattention = new TabItem(tabFolder, SWT.NONE);
		tab_payattention.setText("悄悄关注");
		
		TabItem tab_espattention = new TabItem(tabFolder, SWT.NONE);
		tab_espattention.setText("特别关注");
		
		TabItem tab_more = new TabItem(tabFolder, SWT.NONE);
		tab_more.setText("更多");
		
		this.pack();
	}
	
}
